﻿<UserControl x:Class="GTServices.WPF.Client.Views.OptionsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:cont ="clr-namespace:GTServices.WPF.Client.Controls"
             xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <DockPanel>
        <StackPanel DockPanel.Dock="Bottom">
            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal" >
                <cont:ClickableLabel Text="Save"     cal:Message.Attach="[Event Click] = [Action Save]" />
                <cont:ClickableLabel Text="Cancel"   cal:Message.Attach="[Event Click] = [Action Cancel]" />
            </StackPanel>
            <StatusBar>
                <StatusBarItem>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding Status}" />
                    </StackPanel>
                </StatusBarItem>
            </StatusBar>
        </StackPanel>
        <StackPanel>
            <Label Content="Default Database:" />
            <DockPanel>
                <cont:ClickableLabel DockPanel.Dock="Right" Text="Select" cal:Message.Attach="[Event Click] = [Action SelecteDatabaseFile]" />
                <TextBox Text="{Binding DefaultDatabase, UpdateSourceTrigger=PropertyChanged}" DockPanel.Dock="Left" />
            </DockPanel>

            <CheckBox IsChecked="{Binding ReuseCodeWindows}" Content="Reuse Code Windows" />
            <CheckBox IsChecked="{Binding UpdateOnAdd}" Content="Update Current Database Values on Add" />
        </StackPanel>
    </DockPanel>
</UserControl>
